package com.jinzhi.jinzhidata.service.impl;

import com.jinzhi.jinzhidata.dataobject.ArticleContent;
import com.jinzhi.jinzhidata.repository.ArticleContentRepository;
import com.jinzhi.jinzhidata.service.ArticleContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description
 * @date 2019-12-28 23:43
 **/
@Service
public class ArticleContentServiceImpl implements ArticleContentService {

    @Autowired
    ArticleContentRepository articleContentRepository;

    @Override
    public ArticleContent selectByArticleContentId(String articleContentId) {
        return articleContentRepository.findById(articleContentId).orElse(null);
    }

    @Override
    public ArticleContent saveArticleContent(ArticleContent articleContent) {
        return articleContentRepository.save(articleContent);
    }

}
